﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="PageAuthorityManage.aspx.cs" Inherits="Wicresoft.RDW.Manage.PageAuthorityManage" %>

<%@ Register Src="../UserControls/PagerControl.ascx" TagName="PagerBasicControl"
    TagPrefix="uc" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div class="main_title">
        <h2>
            <%=Resources.NameResource.PageAuthorityManage%></h2>
    </div>
    <div class="line_gray">
    </div>
    <br />
    <asp:PlaceHolder ID="phEdit" runat="server" Visible="false">
        <asp:Label ID="lblSubmitError" runat="server" ForeColor="Red" />
        <div class="CustomerManagement">
            <table width="100%" cellpadding="0" cellspacing="0">
                <tbody>
                    <tr class="dcTableItem2">
                        <td class="CustomerM">
                            <asp:Label ID="lblRoleId" runat="server" />
                        </td>
                        <td>
                            <asp:DropDownList ID="ddlRoleId" runat="server" Width="95%" />
                        </td>
                    </tr>
                    <tr class="dcTableItem2">
                        <td class="CustomerM">
                            <asp:Label ID="lblUserId" runat="server" />
                        </td>
                        <td>
                            <asp:DropDownList ID="ddlUserId" runat="server" Width="95%" />
                        </td>
                    </tr>
                    <tr class="dcTableItem2">
                        <td class="CustomerM">
                            <asp:Label ID="lblPagePath" runat="server" />
                        </td>
                        <td>
                            <asp:TextBox runat="server" ID="txtPagePath" Width="95%" MaxLength="100" />
                            <asp:RequiredFieldValidator ID="rfvtxtPagePath" runat="server" ErrorMessage="*" Display="Dynamic"
                                ForeColor="Red" ControlToValidate="txtPagePath"></asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr class="dcTableItem2">
                        <td class="CustomerM">
                            <asp:Label ID="lblEnable" runat="server" />
                        </td>
                        <td>
                            <asp:CheckBox ID="cbxEnable" runat="server" />
                        </td>
                    </tr>
                    <tr class="dcTableItem">
                        <td colspan="2">
                            <div class="sqbtnPane">
                                <p class="sqbtn">
                                    <asp:LinkButton ID="btnSubmit" runat="server" OnClick="btnSubmit_Click" /></p>
                                <p class="sqbtn">
                                    <asp:LinkButton ID="btnCancel" runat="server" OnClick="btnCancel_Click" CausesValidation="false" /></p>
                            </div>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
    </asp:PlaceHolder>
    <div align="right">
        <asp:Button ID="btnAdd" runat="server" CausesValidation="False" OnClick="btnAdd_Click" />
    </div>
    <div class="HistoryApplicationContent">
        <asp:GridView ID="gvPriviledge" runat="server" AutoGenerateColumns="false" Width="100%"
            DataKeyNames="Id" OnRowDataBound="gvPriviledge_RowDataBound" OnRowUpdating="gvPriviledge_RowUpdating"
            OnRowDeleting="gvPriviledge_RowDeleting" HeaderStyle-CssClass="dcTableHeader"
            RowStyle-CssClass="dcTableAlternatingItem" AlternatingRowStyle-CssClass="dcTableItem">
            <Columns>
                <asp:TemplateField ItemStyle-Width="20%">
                    <ItemTemplate>
                        <asp:Label ID="lblRoleId" runat="server" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField ItemStyle-Width="20%">
                    <ItemTemplate>
                        <asp:Label ID="lblUserId" runat="server" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="PagePath" ItemStyle-Width="20%" />
                <asp:TemplateField ItemStyle-Width="20%">
                    <ItemTemplate>
                        <asp:Label ID="lblEnable" runat="server" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField ItemStyle-Width="20%">
                    <ItemTemplate>
                        <asp:LinkButton class="CommandButton" ID="lbtnUpdate" runat="server" CausesValidation="False"
                            CommandName="Update" Text="Update"></asp:LinkButton>
                        <asp:LinkButton class="CommandButton" ID="lbtnDelete" runat="server" CausesValidation="False"
                            CommandName="Delete" Text="Delete"></asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <EmptyDataTemplate>
                <table width="100%">
                    <tr class="dcTableHeader">
                        <th width="20%">
                            <%=Resources.NameResource.Priviledge_RoleId%>
                        </th>
                        <th width="20%">
                            <%=Resources.NameResource.Priviledge_UserId%>
                        </th>
                        <th width="20%">
                            <%=Resources.NameResource.Priviledge_PagePath%>
                        </th>
                        <th width="20%">
                            <%=Resources.NameResource.Priviledge_Enable%>
                        </th>
                        <th width="20%">
                            <%=Resources.ManageResource.mgr_lblAction%>
                        </th>
                    </tr>
                </table>
            </EmptyDataTemplate>
        </asp:GridView>
        <uc:PagerBasicControl ID="pager" runat="server" PageSize="10" />
    </div>
</asp:Content>
